package com.xiaomei.manager.service;

import java.util.List;

import com.xiaomei.manager.model.Experience;
import com.xiaomei.manager.web.dto.ActivityStateAndUserDto;
import com.xiaomei.manager.web.dto.req.ActivityRecQueryDto;
import com.xiaomei.manager.web.dto.req.ExperienceQueryDto;
import com.xiaomei.manager.web.page.Page;

public interface IExperienceService {
	/**
	 * 查询所有体验券
	 * @return
	 */
	public List<Experience> selectAll();
	
	/**
	 * 根据查询条件查询体验券结果，并分页显示
	 * @param dto
	 * @param page
	 * @return
	 */
	public List<Experience> selectByParam(ExperienceQueryDto dto, Page<Experience> page);

	/**
	 * 报名活动的人，并分页显示
	 * @param dto
	 * @param page
	 * @return
	 */
	public List<ActivityStateAndUserDto> selectSignupUserByParam(ActivityRecQueryDto dto, Page<ActivityStateAndUserDto> page);

	/**
	 * 将认证过程中的体验券分配给认证用户
	 * @param userCode
	 * @param id
	 * @return
	 */
	public boolean distributeTicket(String userCode, Integer id);
	
	
	/**
	 * 查询所有认证送的体验券
	 * @return
	 */
	public List<Experience> selectByTicket(String ticketType);
	
	/**
	 * 根据id查找
	 * @return
	 */
	public Experience selectExperienceById(Integer id);
	
	public Integer selectMaxID();
	
	/**
	 * 创建新的体验券
	 * @param experience
	 * @return
	 */
	public boolean createExperience(Experience experience);
	
	/**
	 * 根据id查找体验券
	 * @param id
	 * @return
	 */
	public Experience findOne(Integer id);
	
	/**
	 * 更新体验券信息
	 * @param experience
	 * @return
	 */
	public boolean updateExperience(Experience experience);
	
	/**
	 * 删除某个体验券
	 * @param id
	 * @return
	 */
	public boolean deleteExperience(Integer id);

	/**
	 * 激活体验券
	 * @param userCode
	 * @param id
	 * @param state
     * @return
     */
	public boolean doActiveUser(String userCode, int id, int state);
}
